
/*
* Location object constructor
*
*/
function Location(locationName, locationID, locationHref){
	//alert("location");
	this.locationName = locationName;
	this.locationID = locationID;
	this.locationHref = locationHref;
	this.lots = new Array();

	this.count = 0;
	//this.lot = new Array(lotArray.length);
	/*for(i=0; i<lotArray.length; i++){
	    this.lot[i] = lotArray[i];
	}*/
}

/**
** Location Object methods starts here
**/	

//alert("Location Entering");

Location.prototype.getID = function(){
	return this.locationID;
}

Location.prototype.getName = function(){
	return this.locationName;
}

Location.prototype.getHref = function(){
	return this.locationHref;
}

Location.prototype.addLot = function(lot){
	this.lots[this.count] = lot;
	this.count++;
}
	
Location.prototype.getLots =function(){
	return this.lots;
}

Location.prototype.getLotNames = function(){
	var arrayNames = new Array(this.lots.length);
	for(i=0; i<this.lots.length; i++){
		array[i] = this.lots[i].getName();
	}
	return arrayNames.toString();
}

Location.prototype.getLotIDs = function(){
	var arrayIDs = new Array(this.lots.length);
	for(i=0; i<this.lots.length; i++){
		arrayIDs[i] = this.lots[i].getID();
	}
	return arrayIDs;
}
Location.prototype.getLotHrefs = function(){
	var arrayHrefs = new Array(this.lots.length);
	for(i=0; i<this.lots.length; i++){
		arrayIDs[i] = this.lots[i].getHref();
	}
	return arrayHrefs;
}
//alert("Location Exiting");
